<!doctype html>
<html lang="en" data-framework="backbonejs">
	<head>
		<meta charset="utf-8">
		<title>Todo-Backend client</title>
		<link rel="stylesheet" href="css/vendor/todomvc-common.css">
		<link rel="stylesheet" href="css/chooser.css">
	</head>
	<body>

    <section id="api-root">
      <div class="wrapper">
        <label for="api-root-url">Todo-Backend api root</label>
        <input id="api-root-url" placeholder="e.g. http://todo-backend-sinatra.herokuapp.com/todos"></input>
      </div>
      <button>go</button>
    </section>

    <section id="target-info">
      <h2>client connected to: <span class="target-url"/></h2>
      <a href="./index.html">choose a different server to connect to</a>
    </section>

		<section id="todoapp">
			<header id="header">
				<h1>todos</h1>
				<input id="new-todo" placeholder="What needs to be done?" autofocus>
			</header>
			<section id="main">
				<input id="toggle-all" type="checkbox">
				<label for="toggle-all">Mark all as complete</label>
				<ul id="todo-list"></ul>
			</section>
			<footer id="footer"></footer>
		</section>
		<footer id="info">
			<p>Double-click to edit a todo</p>
      <p>Written by <a href="https://github.com/addyosmani">Addy Osmani</a>, modified by <a href="https://github.com/moredip">Pete Hodgson</a> to be integrated with a <a href="http://www.todobackend.com">TodoBackend API</a>.</p>
      <p>Part of <a href="http://todomvc.com">TodoMVC</a> &amp; <a href="http://www.todobackend.com">TodoBackend</a></p>
		</footer>
		<script type="text/template" id="item-template">
			<div class="view">
				<input class="toggle" type="checkbox" <%= completed ? 'checked' : '' %>>
				<label><%- title %></label>
				<button class="destroy"></button>
			</div>
			<input class="edit" value="<%- title %>">
		</script>
		<script type="text/template" id="stats-template">
			<span id="todo-count"><strong><%= remaining %></strong> <%= remaining === 1 ? 'item' : 'items' %> left</span>
			<ul id="filters">
				<li>
					<a class="selected" href="#/">All</a>
				</li>
				<li>
					<a href="#/active">Active</a>
				</li>
				<li>
					<a href="#/completed">Completed</a>
				</li>
			</ul>
			<% if (completed) { %>
			<button id="clear-completed">Clear completed (<%= completed %>)</button>
			<% } %>
		</script>
		<script src="js/vendor/todomvc-common.js"></script>
		<script src="js/vendor/jquery.js"></script>
		<script src="js/vendor/underscore.js"></script>
		<script src="js/vendor/backbone.js"></script>

		<script src="js/models/todo.js"></script>
		<script src="js/collections/todos.js"></script>
		<script src="js/views/todo-view.js"></script>
		<script src="js/views/app-view.js"></script>
		<script src="js/routers/router.js"></script>
		<script src="js/app.js"></script>
	</body>
</html>
